package com.lmk.homework.work02;

public class GeometricObject {
    private String color;
    private double weight;

    public GeometricObject(String color, double weight) {
        this.color = color;
        this.weight = weight;
    }
    public boolean equalsArea(GeometricObject another){ //动态绑定
        return findArea() == another.findArea();
    }
    public void displayArea() {//动态绑定
        System.out.println(findArea());
    }

    private boolean findArea() {
        return false;
    }


    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }
}
